﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KPI.Utility;
using KPI.OrganizationDomain.Model.Entity;

namespace KPI.OrganizationDomain.Infrastructure.DbObject
{
    public class EmployeeTitleTab:EntityBase
    {
        public int EmployeeTitleID{get;set;}
        public string Name{get;set;}
        public string Description{get;set;}
        public int BasicEmployeeLevelID { get; set; }

        public EmployeeTitleTab()
        {}

        public EmployeeTitleTab(EmployeeTitle employeeTitleDto)
        {
            this.BasicEmployeeLevelID = employeeTitleDto.BasicEmployeeLevel.EmployeeLevelID;
            this.CreatedDate = employeeTitleDto.CreatedDate;
            this.Description = employeeTitleDto.Description;
            this.EmployeeTitleID = employeeTitleDto.EmployeeTitleID;
            this.IsDeleted = employeeTitleDto.IsDeleted;

            this.LastModifiedDate = employeeTitleDto.LastModifiedDate;
            this.Name = employeeTitleDto.Name;
            this.Version = employeeTitleDto.Version;
        }

        public static EmployeeTitle FillEmployeeTitle(EmployeeTitleTab titleTab, EmployeeTitle titleDto)
        {
            titleDto.EmployeeTitleID = titleTab.EmployeeTitleID;
            titleTab.Copy<EmployeeTitle>(titleDto);

            return titleDto;
        
        }

    }
}
